package com.gzhryc.shared_device.oem.code.statistics.dao.db;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.DateBranchTable;
import com.gzhryc.jdbc.annotaion.PrimaryKey;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.jdbc.enums.DateBranchTableType;

import java.util.Date;

@DateBranchTable(type = DateBranchTableType.year)
@Table(name = "statistics_user_profit_day")
public class UserProfitDayStatistics {

    @PrimaryKey
    @Column(name="day_date",notNull = true,note = "统计日期，格式：yyyyMMdd")
    protected String dayDate;

    @PrimaryKey
    @Column(name = "user_id",notNull = true, note = "用户ID")
    protected Long userId;

    @Column(name = "user_name",note = "用户名称")
    protected String userName;

    @Column(name = "user_phone",note = "用户手机号")
    protected String userPhone;

    @Column(name="year_num",notNull = true,note = "统计年")
    protected Integer yearNum;

    @Column(name="month_num",notNull = true,note = "统计月")
    protected Integer monthNum;

    @Column(name="day_num",notNull = true,note = "统计日")
    protected Integer dayNum;

    @Column(name="order_money",notNull = true,defVal = "0",note = "营业额，单位：厘")
    protected Long orderMoney;

    @Column(name="income_count",notNull = true,defVal = "0",note = "收益次数")
    protected Integer incomeCount;

    @Column(name="income_money",notNull = true,defVal = "0",note = "收益金额，单位：厘")
    protected Long incomeMoney;

    @Column(name="refund_count",notNull = true,defVal = "0",note = "退款次数")
    protected Integer refundCount;

    @Column(name="refund_money",notNull = true,defVal = "0",note = "退款金额，单位：厘")
    protected Long refundMoney;

    @Column(name="history_refund_count",notNull = true,defVal = "0",note = "历史退款次数")
    protected Integer historyRefundCount;

    @Column(name="history_refund_money",notNull = true,defVal = "0",note = "历史退款金额，单位：厘")
    protected Long historyRefundMoney;

    @Column(name = "update_date", autoUpdateTime = true)
    protected Date updateDate;

    @Column(name = "create_date")
    protected Date createDate;

    public String getDayDate() {
        return dayDate;
    }

    public void setDayDate(String dayDate) {
        this.dayDate = dayDate;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public Integer getYearNum() {
        return yearNum;
    }

    public void setYearNum(Integer yearNum) {
        this.yearNum = yearNum;
    }

    public Integer getMonthNum() {
        return monthNum;
    }

    public void setMonthNum(Integer monthNum) {
        this.monthNum = monthNum;
    }

    public Integer getDayNum() {
        return dayNum;
    }

    public void setDayNum(Integer dayNum) {
        this.dayNum = dayNum;
    }

    public Long getOrderMoney() {
        return orderMoney;
    }

    public void setOrderMoney(Long orderMoney) {
        this.orderMoney = orderMoney;
    }

    public Integer getIncomeCount() {
        return incomeCount;
    }

    public void setIncomeCount(Integer incomeCount) {
        this.incomeCount = incomeCount;
    }

    public Long getIncomeMoney() {
        return incomeMoney;
    }

    public void setIncomeMoney(Long incomeMoney) {
        this.incomeMoney = incomeMoney;
    }

    public Integer getRefundCount() {
        return refundCount;
    }

    public void setRefundCount(Integer refundCount) {
        this.refundCount = refundCount;
    }

    public Long getRefundMoney() {
        return refundMoney;
    }

    public void setRefundMoney(Long refundMoney) {
        this.refundMoney = refundMoney;
    }

    public Integer getHistoryRefundCount() {
        return historyRefundCount;
    }

    public void setHistoryRefundCount(Integer historyRefundCount) {
        this.historyRefundCount = historyRefundCount;
    }

    public Long getHistoryRefundMoney() {
        return historyRefundMoney;
    }

    public void setHistoryRefundMoney(Long historyRefundMoney) {
        this.historyRefundMoney = historyRefundMoney;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getIncomeMoneyStr(){
        return NumberTools.getMoneyLiStr(this.incomeMoney);
    }

    public String getRefundMoneyStr(){
        return NumberTools.getMoneyLiStr(this.refundMoney);
    }

    public String getOrderMoneyStr(){
        return NumberTools.getMoneyLiStr(this.orderMoney);
    }

    public String getHistoryRefundMoneyStr(){
        return NumberTools.getMoneyLiStr(this.historyRefundMoney);
    }
}
